Telegram Group & Telegram Channel
Статические методы

Отличие статического метода от обычного метода класса в том, что первый привязан к классу, а не объекту.

Такой тип методов по умолчанию не принимает ни объект, ни класс – прописывать self или cls в аргументах не нужно. То есть статические методы не могут модифицировать ни объект, ни сам класс.

Обычную функцию стоит вносить в класс в качестве статического метода в том случае, когда эта функция логически относится к классу и имеет смысл там быть.

Подписывайтесь на канал 👉@pythonofff



tg-me.com/pythonofff/2973
Create:
Last Update:

Статические методы

Отличие статического метода от обычного метода класса в том, что первый привязан к классу, а не объекту.

Такой тип методов по умолчанию не принимает ни объект, ни класс – прописывать self или cls в аргументах не нужно. То есть статические методы не могут модифицировать ни объект, ни сам класс.

Обычную функцию стоит вносить в класс в качестве статического метода в том случае, когда эта функция логически относится к классу и имеет смысл там быть.

Подписывайтесь на канал 👉@pythonofff

BY Python академия




Share with your friend now:
tg-me.com/pythonofff/2973

View MORE
Open in Telegram


Python академия Telegram | DID YOU KNOW?

Date: |

What is Telegram Possible Future Strategies?

Cryptoassets enthusiasts use this application for their trade activities, and they may make donations for this cause.If somehow Telegram do run out of money to sustain themselves they will probably introduce some features that will not hinder the rudimentary principle of Telegram but provide users with enhanced and enriched experience. This could be similar to features where characters can be customized in a game which directly do not affect the in-game strategies but add to the experience.

At a time when the Indian stock market is peaking and has rallied immensely compared to global markets, there are companies that have not performed in the last 10 years. These are definitely a minor portion of the market considering there are hundreds of stocks that have turned multibagger since 2020. What went wrong with these stocks? Reasons vary from corporate governance, sectoral weakness, company specific and so on. But the more important question is, are these stocks worth buying?

Python академия from it


Telegram Python академия
FROM USA